#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import set_angles_adaptive
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.set_angles_adaptive(id_list=data.id_list, angle_list=data.angle_list, speed_list=data.speed_list, torque_list=data.torque_list)
    rospy.loginfo("set_angles_adaptive_node")


def listener():
    rospy.init_node("set_angles_adaptive", anonymous=True)
    rospy.Subscriber("set_angles_adaptive", set_angles_adaptive, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

